import { useEffect } from "react";
import { useLocation } from "react-router-dom";
import { Outlet } from "react-router-dom";
import { Layout } from "antd";
const { Header, Footer, Content } = Layout;
import Head from "../components/Head";
import FootBar from "../components/Footer";

const layoutStyle = {
  overflow: "hidden",
  width: "100%",
  maxWidth: "100%",
  height: "100%",
};
const headerStyle = {
  height: 64,
  padding: 0,
};
const contentStyle = {
  padding: 0,
  height: "calc(100% - 128px)",
  overflow: "auto",
  backgroundColor: "#f0f2f5",
};
const footerStyle = {
  height: 64,
  padding: 0,
};

export default function DoctorLayout() {
  let location = useLocation();
  useEffect(() => {
    console.log("登录路由参数", location.state);
  }, []);

  return (
    <div className=" w-full h-full relative layout">
      <Layout style={layoutStyle}>
        <Header style={headerStyle}>
          <Head />
        </Header>
        <Content style={contentStyle}>
          <Outlet />
        </Content>
        <Footer style={footerStyle}>
          <FootBar />
        </Footer>
      </Layout>
    </div>
  );
}
